import axios from '../request';
import { GoodSaveInfo } from '../model/goods';
interface PageInfo {
  id?: number; //
  name: string; //文件夹名
  refType: number; //4
  refId?: number;
}
// 保存文件夹
export const folderSave = (parmas: PageInfo) => {
  return axios.post<any>(`api/folder`, parmas);
};
// 删除文件夹
export const folderDel = (parmas: PageInfo) => {
  let arr = JSON.stringify(parmas);
  return axios.deletes<any>(`api/folder`, arr);
};
//获取分组数量
export const folderGet = (refType: number) => {
  return axios.get<any>(`api/folder/group/${refType}`, {});
};
// 保存文件夹
export const Getfolder = (refType: number) => {
  return axios.get<any>(`api/folder/list/${refType}`, {});
};
interface FoldInfo {
  refType: number;
  refId: number;
}
//设置藏品到文件夹
export const setFold = (id: number, parmas: FoldInfo) => {
  return axios.put<any>(`api/folder/set/${id}`, parmas);
};
